package com.ic.loan.pop

import android.content.Context
import com.ic.loan.R
import com.lxj.xpopup.core.CenterPopupView
import com.lxj.xpopup.util.XPopupUtils
import kotlinx.android.synthetic.main.pop_select_picture.view.*

/**
 * @Author:chenxin
 * @E-mail:1715120163@qq.com
 * @Create time 2021/10/19
 * @Description
 */
class SelectPicturePop(var mContext: Context,var clickTakePhoto:()->Unit, var clickPhotos:()->Unit) : CenterPopupView(mContext) {
    override fun getImplLayoutId(): Int {
        return R.layout.pop_select_picture
    }

    override fun getMaxWidth(): Int {
        return (XPopupUtils.getAppWidth(mContext)*0.8).toInt()
    }

    override fun onCreate() {
        super.onCreate()
        tv_take_photo.setOnClickListener {
            dismiss()
            clickTakePhoto.invoke()
        }
        tv_photos.setOnClickListener {
            dismiss()
            clickPhotos.invoke()
        }
    }
}